LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-02-2011, 08:07 AM   #1
phileas
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Rep: Reputation: 0
[SOLVED] apt-get upgrade broke my fglrx


Hi, just in case anyone else runs into the same trouble:

Today I did a apt-get upgrade on my debian stable and after rebooting I got a black screen and a totally non-responsive keyboard, which made it hard to examine the situation.

That is not what you want on a sunday morning!

The problem was:
There were some xserver-xorg-core upgrades involved and so I had to rerun my ati-installer-*.bin to recompile the fglrx video driver (I can't use the .deb-package because my video card isn't supported by it).

One question: Is it possible to simply undo an apt-get upgrade?
 
Old 01-05-2011, 01:15 PM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Thanks for the tip.

Edit: check out:
Code:
ls -tl /var/lib/dpkg/info/*.list  |less -SN
There is also an awk command that will make a really nice list from this.

Last edited by archtoad6; 01-05-2011 at 02:55 PM.
 
Old 01-06-2011, 08:15 AM   #3
phileas
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Okay! But I don't know what this list actually tells me...
Is it about undo-ing an upgrade?
 
Old 01-07-2011, 08:07 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Sorry, my last post was so short -- I was trying to get out the door to a LUG meeting.

The list tells you every package on your machine & when it was installed, because /var/lib/dpkg/info/ contains a .list for each package. Therefore, listing (ls) the .list files gives a list of packages. The "-l" option shows the date/time stamps, & "-t" puts the list in time order. From this you should be able to figure out what was upgraded & therefore what to remove to roll back the upgrade.


For example, I just finished running aptitude safe-upgrade, & this is the beginning of the output of ls -tl /var/lib/dpkg/info/*.list |less -SN:
Code:
      1 -rw-r--r-- 1 root root   7927 2011-01-07 07:15 /var/lib/dpkg/info/dpkg.list
      2 -rw-r--r-- 1 root root  17851 2011-01-06 07:11 /var/lib/dpkg/info/openssl.list
      3 -rw-r--r-- 1 root root    840 2011-01-06 07:11 /var/lib/dpkg/info/libssl0.9.8.list

Adding cut & sed to the command can simplify the output:
Code:
ls -tl /var/lib/dpkg/info/*.list  \
| cut -c 31-47,67-  \
| sed 's,.list$,,'  \
| less -SN
gives:
Code:
      1 2011-01-07 07:15 dpkg
      2 2011-01-06 07:11 openssl
      3 2011-01-06 07:11 libssl0.9.8

You can add some simple formatting to the sed portion:
Code:
ls -tl /var/lib/dpkg/info/*.list  \
| cut -c 31-47,67-  \
| sed 's,.list$,,;s, ,   ,2;s, ,  ,'  \
| less -SN
getting:
Code:
      1 2011-01-07  07:15   dpkg
      2 2011-01-06  07:11   openssl
      3 2011-01-06  07:11   libssl0.9.8

There is a wonderful awk command that makes a list by day:
Code:
      1 2011-01-07  dpkg
      2 2011-01-06  openssl
      3             libssl0.9.8
Unfortunately, I cannot find that awk command, in spite of spending a couple of hours searching for it yesterday. Sorry.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recent Upgrade Broke Xscreensaver (solved) kevinbenko Debian 0 11-14-2008 11:37 AM
apt-get dist-upgrade broke fglrx driver? drewbug01 Linux - Hardware 1 10-27-2006 03:14 PM
Debian unstable - apt-get upgrade broke apache2 GT_Onizuka Debian 3 10-10-2006 06:06 PM
apt-get upgrade broke kcm_kio.so Dtsazza Debian 1 10-10-2006 08:54 AM
apt-get dist-upgrade broke lilo, apache & squid mikeaustn Debian 10 07-24-2005 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration